<?xml version="1.0" encoding="utf-8" ?>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<jsp:include page="/commonPart/htmlHeader2.jsp">
	<jsp:param name="title" value="我的收藏夹-${userInfo.name}的个人空间-CommonWorld" />
</jsp:include>
<body>
<div id = "CW_Screen" >
	<jsp:include page= "/commonPart/bodyHeader2.jsp" ></jsp:include>
	<div id = "CW_Content">
		<div id = "SpaceLeft">
			<c:choose>
				<c:when test="${visitorStatus.id == userInfo.id}">
					<jsp:include page = "/commonPart/MySpaceLeft.jsp" ></jsp:include>
				</c:when>
				<c:otherwise>
					<jsp:include page = "/commonPart/OtherSpaceLeft.jsp"></jsp:include>
				</c:otherwise>
			</c:choose>
			<jsp:include page = "/commonPart/HomeSpaceLeft.jsp"></jsp:include>
		</div>
		<div class = "SpaceList Favorites">
			<div class = "TopBar">
				<div class = "NavPath">
					<a href = "${userUrls.home}">空间</a> >>
					<a href = "${userUrls.favorites}">我的收藏夹</a>
				</div>
			</div>
			<div style = "color: #666; margin-bottom: 20px; border-bottom: 1px solid #ccc;">
				<h1>我的收藏夹</h1>
			</div>
			<ul class = "FavList">
				<c:forEach items= "${blogInfos}" var="blogInfo">
					<li id = "fav_${blogInfo.blogId}">
						<span class = "opts">
							<c:if test = "${visitorStatus.id == userInfo.id}">
								<a href = "javascript:delete_favor(${blogInfo.blogId})">取消</a>
							</c:if>
						</span>
						<a class = "title" href = "${blogInfo.url}" target="_blank">${blogInfo.title}</a>
					</li>
				</c:forEach>
			</ul>
		</div>
		<script>
			function delete_favor(blogId) {
				if (!confirm("确定要取消此收藏吗？"))
					return;
				ajax_post('/action/blog/deleteFavor', 'blogId=' + blogId, function (html) {
					$('#fav_' + blogId).fadeOut();
				});
			}
		</script>
	</div>
	<div class = "clear"></div>
	<div id = "footer">
</div>
</body>
</html>